const mongoose = require('mongoose');

// 广告位
const schema = new mongoose.Schema({
  username: { type: String },
  password: {
    type: String,
    select: false, //查询的时候不带这个参数
    set(val) {
      return require('bcrypt').hashSync(val, 10);
    },
  },
});

module.exports = mongoose.model('AdminUser', schema);
